-- GENERATED SPELL FOR [Shadowforge Relic Hunter] --


function spell0_4847(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(6064,pUnit)
pUnit:RegisterEvent('Sorts_4847', 3000, 1)
end

function spell1_4847(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(2767,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4847', 18000, 1)
end

function spell2_4847(pUnit, Event) --@Silence,n/a--
pUnit:FullCastSpellOnTarget(6726,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4847', 5303, 1)
end

function Sorts_4847(pUnit, Event)
local choix_sorts_4847 = math.random(0, 2)
if choix_sorts_4847 == 0 then
pUnit:RegisterEvent('spell0_4847', 1, 1)
end
if choix_sorts_4847 == 1 then
pUnit:RegisterEvent('spell1_4847', 1, 1)
end
if choix_sorts_4847 == 2 then
pUnit:RegisterEvent('spell2_4847', 1, 1)
end
end

function mob4847_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4847', math.random(1500, 3000), 1)
end

function mob4847_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4847_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4847_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4847, 1, 'mob4847_Action')
RegisterUnitEvent(4847, 2, 'mob4847_Leave')
RegisterUnitEvent(4847, 3, 'mob4847_Kill')
RegisterUnitEvent(4847, 4, 'mob4847_Die')
